#ifndef _IMU_H
#define	_IMU_H

#include "board.h"

#define IMU_INTEGRAL_LIM  ( 2.0f *ANGLE_TO_RAD )
#define Kp 0.6f     // proportional gain governs rate of convergence to accelerometer/magnetometer
#define Ki 0.1f     // integral gain governs rate of convergence of gyroscope biases

typedef struct _eulerAngle {
    float pitch;
    float roll;
    float yaw;
} eulerAngle;

extern eulerAngle RoboAngle;

void IMU_Update(float half_T, vec3f* gyro, vec3f* acc);

#endif
